# -*- coding: utf-8 -*-
# @Time    : 2021/4/20 20:24
# @Author  : N
# @Email   : 
# @File    : 冒泡排序.py
# @Software: PyCharm
a=[40,20,11,1,9,18,19,3]
for i in range(len(a)):
    for j in range(i+1,len(a)):
        if a[i]>a[j]:
            a[i],a[j]=a[j],a[i]
print(a)